package design.pattern.装饰者模式;

/**
 * 抽象装饰类
 */
public abstract class Decorator implements Component {

     public Component component;

    public void setComponent(Component component) {
        this.component = component;
    }

    @Override
    public void operation() {
        if(component != null)
            component.operation();
    }
}
